package com.zhentao.controller;

import com.zhentao.domain.SysPreferentialExplain;
import com.zhentao.domain.vo.Result;
import com.zhentao.service.SysPreferentialExplainService;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/explain")
@Tag(name = "优惠说明管理")
public class ExplainController {
    @Autowired
    private SysPreferentialExplainService sysPreferentialExplainService;
    @GetMapping("/explainList")
    @Operation(summary = "获取优惠说明列表")
    public Result explainList(){
        List<SysPreferentialExplain> all = sysPreferentialExplainService.getAll();
        return Result.build(all,200,"查询成功");
    }

}
